package com.ewo.mapper;

import com.ewo.entity.Emp;
import com.ewo.entity.EmpInfo;
import com.ewo.entity.workOrder.WorkOrderInfo;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface EmpMapper {

    //查找所有员工信息
    public List<Emp> findAllEmp();

    //查询单个员工信息
    public Emp findEmpByUsername(String username);

    //查询员工的页面工单显示信息
    public int findEmpInfoByUsername(int empId , int work_status);
    //根据员工id及工单状态查询工单信息
    public List<WorkOrderInfo> findEmpOrderByEmpIdAndWork_status(int empId , int work_status);
    //添加员工
    public int addEmp(Emp emp);

    //修改员工信息
    public int updateEmpById(Emp emp);
    //修改员工最后登录信息
    public int updateEmpByUsername(String username, LocalDateTime loginTime);
    //根据username修改password
    public int UpdatePwdByUsername(String username,String password);

    //根据username查询password
    public String FindPwdByUsername(String username);

}
